// pages/search/index.js

Page({
  data: {
    reportList:[]
  },
  TimeId:-1,
  handleInput(e){
    const {value}=e.detail;
    if(!value.trim()){
      return;
    }
    clearTimeout(this.TimeId);
    this.TimeId=setTimeout(()=>{
      this.qsearch(value);
    },1000);
  },
 
  qsearch(name){
    var that = this
    wx.request({
      url: 'http://120.78.160.172:8002/api/Commodity/'+name,
      success:function(res){    
          console.log(res);
          that.setData({
            reportList:res.data
          })
      }
    })
 },
  // handleCancel(){
  //   this.setData({
  //   inputValue: "",
  //   isFocus: false,
  //   showList: []
  //   })
  //   }
})